home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_08
/
1108118b
< prev
next >
Wrap
Text File
|
1993-05-21
|
290b
|
21 lines
1: class X
2: {
3: int i;
4: static int k;
5: public:
6: enum { MAX = 100 };
7: X();
8: void reset() { k = MAX; }
9: };
10:
11: const int MIN = 0;
12:
13: void X::X() : i(MAX)
14: {
15: if (--k <= MIN)
16: reset();
17: }
18:
19: int X::k = MAX;